<script type="text/javascript">
function saveMemo_memo() {
	var parm = $('#editMemoFrom').serialize();
	console.log(parm);
	var url = '${contextPath}main-addMemo.html?time=' + sys_get_time();
	sys_submiting();
	$.ajax({type:'POST', url:url, data:parm,
		success: function(result) {
			sys_submiting_close();
			if (result == 'success') {
				sys_msg('操作成功!');
				$.fn.colorbox.close();
				window.top.location.reload(); 
			} else {
				sys_warning('操作失败!');
			}
		}
	});
}

function delMemo_memo(){
	var code = $('#code').val();
	var parm = {'code':code};
	var url = '${contextPath}main-delMemo.html?time=' + sys_get_time();
	sys_submiting();
	$.ajax({type:'POST', url:url, data:parm,
		success: function(result) {
			sys_submiting_close();
			if (result == 'success') {
				sys_msg('操作成功!');
				$.fn.colorbox.close();
				window.top.location.reload(); 
			} else {
				sys_warning('操作失败!');
			}
		}
	});
}
</script>
<div class="widget" style="float:left;">
	<div class="widget-content">
		<form id="editMemoFrom">
			<input type="hidden" id="code" name="code" value="${(memorandum.code)!''}" />
			<table class="table boo-table table-content" style="width:408px; text-align:left;" broder="2">
				<tbody>
					<tr>
						<td>标题:</td>
						<td><input type="text" name="title" value="${(memorandum.title)!''}" style="width:300px;" /></td>
					</tr>
					<tr>
						<td>开始时间:</td>
						<td>${(memorandum.start)!''}${(start)!''}
						<input type="hidden" name="start" value="${(start)!''}" />
						<input type="hidden" name="end" value="${(end)!''}" />
					</tr>
					<tr>
						<td>结束时间:</td>
						<td>${(memorandum.end)!''}${(end)!''}</td>
					</tr>
					<tr>
						<td>内容:</td>
						<td><textarea name="content" style="width:300px;">${(memorandum.content)!''}</textarea></td>
					</tr>
					<tr>
						<td colspan="2" style="text-align: center;"><a class="btn btn-primary btn-rounded" href="javascript:;" onclick="javascript: saveMemo_memo();"><i class="icon-save"></i> 保 存</a>
						<#if memorandum?? && memorandum.code??>&nbsp;&nbsp;&nbsp;&nbsp;<a class="btn btn-primary btn-rounded" href="javascript:;" onclick="javascript: delMemo_memo();"><i class="icon-save"></i> 删 除</a></#if></td>
					</tr>
				</tbody>
			</table>
		</form>
	</div>
</div>